#-------------------------------------------------
#
# Project created by QtCreator 2022-07-18T14:37:33
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = API_Example_CPP
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


INCLUDEPATH += $$PWD/../include
#临时文件存放位置
MOC_DIR         = temp/moc  #指定moc命令将含Q_OBJECT的头文件转换成标准.h文件的存放目录
RCC_DIR         = temp/rcc  #指定rcc命令将.qrc文件转换成qrc_*.h文件的存放目录
UI_DIR          = temp/ui   #指定rcc命令将.qrc文件转换成qrc_*.h文件的存放目录
OBJECTS_DIR     = temp/obj  #指定目标文件(obj)的存放目录
 
#指定生成的应用程序放置的目录
#DESTDIR         = bin
 
#指定生成的应用程序放置的目录
IDE_SOURCE_TREE = $$PWD #.pro或.pri文件所在的位置
IDE_BUILD_TREE  = $$IDE_SOURCE_TREE/../
win32:CONFIG(debug, debug|release){
    contains(DEFINES, WIN64) {
    DESTDIR = $$IDE_BUILD_TREE/_debug64
    LIBS+= -L$$PWD/../lib/windows/RM-SDK-Windows-x64-CPP-v3.1-Debug  -lRM_API_CPPd
    } else {
    DESTDIR = $$IDE_BUILD_TREE/_debug86
    }
} else:win32:CONFIG(release, debug|release){
    contains(DEFINES, WIN64) {
    DESTDIR = $$IDE_BUILD_TREE/_release64
    LIBS+= -L$$PWD/../lib/windows/RM-SDK-Windows-x64-CPP-v3.1-Debug  -lRM_API_CPP
    } else {
    DESTDIR = $$IDE_BUILD_TREE/_release86
    }
}

linux:CONFIG(debug, debug|release){
    DESTDIR = $$IDE_BUILD_TREE/_debug64
    LIBS+= -L$$PWD/../lib/linux/RM-SDK-Linux-CPP-v3.1-Debug  -lRM_API_CPPd
} else:linux:CONFIG(release, debug|release){
    DESTDIR = $$IDE_BUILD_TREE/_release64
     LIBS+= -L$$PWD/../lib/linux/RM-SDK-Linux-CPP-v3.1-Release -lRM_API_CPP
}
 
#指定生成的应用程序名和图标
#RC_ICONS = Hello.ico
 
#定义编译选项
#QT_DEPRECATED_WARNINGS表示当Qt的某些功能被标记为过时的,那么编译器会发出警告
DEFINES += QT_DEPRECATED_WARNINGS
 
#指定编译器选项和项目配置
CONFIG  += c++11
CONFIG  += warn_on           #告诉qmake要把编译器设置为输出警告信息的
CONFIG  += precompile_header #可以在项目中使用预编译头文件的支持
 
#预编译头文件路径
#PRECOMPILED_HEADER = $$PWD/stable.h
 
#disable C4819 warning
win32:QMAKE_CXXFLAGS_WARN_ON += -wd4819
win32:QMAKE_CXXFLAGS += /FS

SOURCES += \
        main.cpp \
        mainwindow.cpp

HEADERS += \
        mainwindow.h

FORMS += \
        mainwindow.ui
